/* Copyright 2001,2002,2003 NAH6 BV
 * All Rights Reserved
 *
 *  $Header: /var/lib/cvs/secphone/ui/controls/BitmapControl.cpp,v 1.4 2003/11/21 12:39:24 itsme Exp $
 *
 *
 * this module implements a static bitmap control.
 * mainly used to display background images in the phone dialog
 *
 */

#include <afxwin.h>
#include "BitmapControl.h"
#include "debug.h"

BEGIN_MESSAGE_MAP(BitmapControl, CStatic)
    //{{AFX_MSG_MAP(BitmapControl)
    //}}AFX_MSG_MAP
END_MESSAGE_MAP()

BOOL BitmapControl::Create(CWnd *parent, const RECT& position, int resourceid)
{
    // create invisible window
    CStatic::Create(NULL, WS_CHILD|SS_BITMAP|WS_VISIBLE, position, parent);

    if (!m_bmp.LoadBitmap(resourceid)) {
        debug("ERROR loading bitmap resource %d\n", resourceid);
        return FALSE;
    }
    SetBitmap(m_bmp);

    return TRUE;
}

